package com.stox.shared.model;

import com.stox.shared.beans.BeanDescriptor;
import com.stox.shared.i18n.MessageSource;

public class ScreenBeanDescriptor extends BeanDescriptor {
	
	private final String key;  // TODO Why is key needed? We can match on type(class) of the bean OR bean descriptor could have id
	private final BeanDescriptor screenMatchBeanDescriptor;
	
	public ScreenBeanDescriptor(String key, Object screenConfiguration, BeanDescriptor screenMatchBeanDescriptor) {
		super(screenConfiguration);
		this.key = key;
		this.screenMatchBeanDescriptor = screenMatchBeanDescriptor;
		setDisplayName(MessageSource.get(key));
	}
	
	public String getKey() {
		return key;
	}
	
	public BeanDescriptor getScreenMatchBeanDescriptor() {
		return screenMatchBeanDescriptor;
	}
}
